package com.dldata.devtools30.repository.zhibiao;



import com.dldata.devtools30.entity.DevtZbobjInfoEntity;
import com.dldata.devtools30.entity.DevtZbplanTypeEntity;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.Collection;
import java.util.List;

/**
 * Created by ai on 2017/1/11.
 */
@Repository
public interface DevtZbplanTypeEntityDao
        extends com.dldata.devtools30.repository.BaseRepository<DevtZbplanTypeEntity,String>,
        JpaSpecificationExecutor<DevtZbplanTypeEntity> {
    
    @Query("select t from DevtZbplanTypeEntity t where t.typename like  ?1 or typecode like ?1 order by xh ")
    public List<DevtZbplanTypeEntity> getAll(String serach);
    
    @Query("select t from DevtZbplanTypeEntity t where t.typename like  ?1 or typecode like ?1 or id in (?2) order by xh ")
    public List<DevtZbplanTypeEntity> getAll(String serach, Collection<String> IdList);
}
